def user_item_parse(user):
    result = {
        "id": user.id,
        "nickname": user.nickname,
        "account": user.account,
        "password": user.password
    }
    return result

def user_parse(users):
    if isinstance(users, list):
        result = list()
        for user in users:
            result.append(user_item_parse(user))
    else:
        result = user_item_parse(users)
    return result